package cn.edu.nwpu.warehousemanagement.pojo.dto;

import jakarta.validation.constraints.Min;
import jakarta.validation.constraints.NotNull;
import lombok.Builder;
import lombok.Data;

/**
 * 用于按Page获取分页请求的DTO
 *
 * @author LSR
 */
@Data
public class PageDTO {
    @NotNull(message = "页码不能为空")
    @Min(value = 1, message = "页码必须大于0")
    private int pageNum;

    @Min(value = 1, message = "每页数量必须大于0")
    private int pageSize = 20;  //默认为20
}
